<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/8/16
  Time: 17:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div id="main2" style="margin-top: 10%;height:260px;width: 100%"></div>
<script>
    var myChart = echarts.init(document.getElementById('main2'));
    window.onresize = myChart.resize;
    let option = {
        title: {
            left: 'center'
        },
        tooltip: {
            trigger: 'item'
        },
        series: [
            {
                name: '项目',
                type: 'pie',
                radius: '70%',
                data: [
                    { value: 1048, name: '其他' },
                    { value: 735, name: '交通' },
                    { value: 580, name: '农业' },
                    { value: 484, name: '水利' },
                    { value: 300, name: '教育' },
                    { value: 300, name: '建筑业' }
                ],
                emphasis: {
                    itemStyle: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    };

    option && myChart.setOption(option);
</script>
